<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>心理中心预约平台</title>
<!-- Bootstrap -->
<link href="${pageContext.request.contextPath}/css/bootstrap.css"
	rel="stylesheet">
<script src="${pageContext.request.contextPath}/js/jquery-1.11.3.min.js"></script>
<script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath}/myjs/search_back.js"></script>


<style>
a {
	text-decoration: none;
}
</style>
</head>
<body>
	<!--导航部分    -->
	<jsp:include page="../partial_jsp/header.jsp" flush="true"/>
	<!-- 搜索框   -->
	<div class="container">
		<div class="row" style="padding-top: 10px; padding-left: 60px;">

			<div class="col-lg-8">
				<div class="row">
					<div class="col-lg-12">
						<form class="form-inline" method="post"
							action="${pageContext.request.contextPath}/TeacherByName">
							<div class="form-group">
								<input type="text" class="form-control" placeholder="请输入老师姓名"
									id="searchName" name="searchName" value="${list[0]['t_name']}"
									style="width: 590px;">
								<button class="btn btn-primary">搜索</button>
							</div>
						</form>
					</div>



					<!-- *************************** -->
					<c:forEach items="${list }" var="teacher">
						<div class="col-lg-12">
							<a href="#">
								<div class="row" style="padding-top: 20px; height: 220px;">
									<div class="col-lg-3">
										<img
											src="${pageContext.request.contextPath}/img/${teacher.t_img }.jpg"
											height="224px" width="160px" />
									</div>

									<div class="col-lg-8">
										<div class="panel panel-default"
											style="border: none; background-color: ghostwhite;">
											<div class="panel-heading"
												style="padding: 2px; background-color: #E3E3E3;">
												<h3>${teacher.t_name }
													<span style="float: right; padding-right: 40px;"><a href="${pageContext.request.contextPath}/personal/PersonalAction.action?t_id=${teacher.t_id}"><button
															style="color: darkgreen; text-align: right;">预约</button></a></span>
												</h3>
											</div>
											<div class="panel-body" style="padding: 10px;">
												<p>${teacher.t_gender}&nbsp;${teacher.t_nation}</p>
												<p>${teacher.t_position }</p>
												<p>${teacher.t_info }</p>
												<p>${teacher.t_goal }</p>
											</div>
										</div>
									</div>
								</div>
							</a>
						</div>
					</c:forEach>
					<!-- ************************** -->

					<!--分页 -->
					<div class="col-lg-12">
						<nav aria-label="Page navigation">
						<ul class="pagination">
							<li><a
								href="${pageContext.request.contextPath}/TeacherInfo?page=${countPage==1?1:countPage-1 }"
								aria-label="Previous"> <span aria-hidden="true">&laquo;</span>
							</a></li>
							<c:forEach begin="1" end="${count%3==0?count/3:count/3+1}"
								var="page">
								<li><a
									href="${pageContext.request.contextPath}/TeacherInfo?page=${page}">${page}</a></li>
							</c:forEach>
							<li><a
								href="${pageContext.request.contextPath}/TeacherInfo?page=${countPage==lastPage?lastPage:countPage+1 }"
								aria-label="Next"> <span aria-hidden="true">&raquo;</span>
							</a></li>
						</ul>
						</nav>
					</div>

				</div>
			</div>
			<!-- 引入外部jsp -->
			<jsp:include page="../partial_jsp/search_condition.jsp" flush="true"/>
		</div>
	</div>

	<!-- 尾页-->
	<jsp:include page="../partial_jsp/tail.jsp" flush="true"></jsp:include>

</body>
</html>